define(() => {
    return function (ele, res) {
        let str = ""
        res.forEach(val => {
            str += `<dl>
                <dt>
                    <img src="${val.img}"alt="">
                </dt>
                <dd><a href="./detail.html?id=${val.proId}" target="_self">${val.proName}</a></dd>
                <dd><strong>${val.price}元</strong></dd>
                <dd><em>${val.num}人已评价</em></dd>
            </dl>`

        });
        ele.html(str)
    }
})